package com.xiaoyu.cloud.config;

import com.xiaoyu.cloud.OpenFeignErrorDecoder;
import feign.codec.ErrorDecoder;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zgb
 * @desc ...
 * @date 2022-06-30 16:13:32
 */
@Configuration
public class FeignConfig {
    /**
     * 自定义异常解码器
     * @return OpenFeignErrorDecoder
     */
    @Bean
    public ErrorDecoder errorDecoder(){
        return new OpenFeignErrorDecoder();
    }

}
